<template>
   <Carousel :sliders="sliders"></Carousel> 
</template>
<script>
import { mapActions, mapState } from "vuex";
import * as types from "@/store/action-types";
import Carousel from '../components/carousel'
export default {
  data(){
    return {
        sliders:[]
    }
  },
  components:{
    Carousel
  },
  computed: {
    ...mapState(["sliders"])
  },
  methods: {
    ...mapActions([types.SET_SLIDERS])
  },
  async mounted() {
    try{
      await this[types.SET_SLIDERS]();
    }catch(e){
      console.log(e);
    }
  }
};
</script>